package cz.proks.easyhelpdesk.gwt.ui.widget;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.DomEvent;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.Window;


public class FindButton extends AButton {    
    public FindButton() {
        setStyleName(getResources().style().findButton());
        
        addClickHandler(new ClickHandler() {
            
            @Override
            public void onClick(ClickEvent event) {
                event.preventDefault();
                Window.alert("Sorry, not implemented yet");
            }
        });
    }
    
    @Override
    public void onBrowserEvent(Event event) {             
        DomEvent.fireNativeEvent(event, this, this.getElement());
        
        if (DOM.eventGetType(event) == Event.ONCLICK)
            event.preventDefault();
    }
}